<template>
    <div id='myWind' style='width:100%;height:330px'></div>
</template>

<script>
    export default {
        name: "wind",
        data(){
            return{

            }
        },
        mounted() {
            this.drawLine();
        },
        methods:{
            drawLine(){
                let myChart = this.$echarts.init(document.getElementById('myWind'))
                // 绘制图表
                myChart.setOption({
                    title: { text: '风速数据',x:'center' },
                    tooltip: {},
                    xAxis: {
                        type:'category',
                        data: ["11:30","12:00","12:30","13:00","13:30","14:00"]
                    },
                    yAxis: {},
                    series: [{
                        name: '风力',
                        type: 'line',
                        data: ["2.9", 5.3, '6.2', 5, 5.7, 2.10]
                    }]
                });

            }
        }

    }
</script>

<style scoped>

</style>